package com.hm.prac;

public class HourlyEmployee extends Employee {
private double wage;
private double hour;

    public HourlyEmployee() {
    }

    public HourlyEmployee(MyDate birthday, double num, String name, double wage, double hour) {
        super(birthday, num, name);
        this.wage = wage;
        this.hour = hour;
    }

    public double getWage() {
        return wage;
    }

    public void setWage(double wage) {
        this.wage = wage;
    }

    public double getHour() {
        return hour;
    }

    public void setHour(double hour) {
        this.hour = hour;
    }

    @Override
    public double earnings() {
        return wage*hour;
    }

    @Override
    public String toString() {
        return "HourlyEmployee["+super.toString()+"]";
    }
}
